/// @tags:
#include <cstdio>
#include <functional>
#include <iostream>
#include <numeric>

using std::cin, std::cout, std::endl;

namespace BlueQuantum {

constexpr int maxn = 2e5;

int ecnt;
int heads[maxn + 1];

struct Edge {
  int v, nxt;
} e[(maxn + 1) * 2];

inline void add(int u, int v) {
  e[++ecnt].v = v, e[ecnt].nxt = heads[u], heads[u] = ecnt;
}

int in[maxn + 1];

bool vis[maxn + 1];

void dfs(int u) {
  vis[u] = true;
  for (int i = heads[u]; i; i = e[i].nxt) {
    int v = e[i].v;
    if (!vis[v]) {
      dfs(v);
    }
  }
}

int main() {
  int n, m;
  cin >> n >> m;
  for (int i = 1; i <= m; ++i) {
    int u, v;
    cin >> u >> v;
    in[u]++, in[v]++;
    add(u, v), add(v, u);
  }
  int cnt0 = 0, cnt1 = 0, cnt2 = 0;
  for (int i = 1; i <= n; ++i) {
    if (in[i] == 2) ++cnt2;
    if (in[i] == 1) ++cnt1;
    if (in[i] == 0) ++cnt0;
  }
  dfs(1);
  bool flag = true;
  for (int i = 1; i <= n; ++i) {
    flag &= vis[i];
  }
  if (cnt1 == 2 && cnt2 == n - 2 && flag) {
    cout << "Yes";
  } else {
    cout << "No";
  }
  return 0;
}

}  // namespace BlueQuantum

int main() {
#ifndef ONLINE_JUDGE
#ifdef LOCAL
  freopen("/tmp/CodeTmp/testdata.in", "r", stdin);
  freopen("/tmp/CodeTmp/testdata.out", "w", stdout);
#else
  freopen("C - Path Graph?.in", "r", stdin);
  freopen("C - Path Graph?.out", "w", stdout);
#endif
#endif

  std::ios::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
  return BlueQuantum::main();
}
